<?php

namespace app\adminapi\controller\system;

use app\adminapi\controller\AdminBase;
use app\common\logic\system\AdminLogic;
use app\common\model\system\AdminModel;
use app\common\service\JsonService;

/**
 * 管理员用户自我设置
 */
class User extends AdminBase
{
    /**
     * 查询登录信息
     * @return \think\response\Json
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function getUserInfo(){
        //$adminLogic = new AdminLogic();
        $admin = AdminModel::find($this->adminId);
        return JsonService::data($admin);
        //$adminLogic
    }
}